package com.seewo.dubbo.debugger.admin.mapper;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.seewo.dubbo.debugger.admin.entity.Service;
import com.seewo.dubbo.debugger.admin.po.ServiceRegistryPO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author chenliangliang
 * @since 2018-07-25
 */
public interface ServiceMapper extends BaseMapper<Service> {
    /**
     * 批量插入
     *
     * @param list
     * @return
     */
    int batchInsert(List<Service> list);

    /**
     * 连接查询service和registry
     *
     * @param address
     * @param protocol
     * @return
     */
    ServiceRegistryPO selectServiceRegistry(@Param("registryId") Integer registryId, @Param("address") String address, @Param("protocol") String protocol);
}
